import request from "@/utils/request";
//
const BASE_URL = "http://127.0.0.1:8001";

// 测试1
request.get(BASE_URL + "/db.json").then(response => {
  console.log("get1", response.data);
}).catch(error => {
  console.log(error);
});

// 测试2,使用对象的形式传入请求配置
request({
  url: BASE_URL + "/db.json",
  methods: "get"
}).then(response => {
  console.log(response.data);
}).catch(error => {
  console.log(error);
});

// 测试3 导出默认对象
export default {
  getList() {
    const reques = request({
      url: BASE_URL + "/db.json",
      methods: "get"
    });

    return reques;
  }
};
